<!DOCTYPE html>
<html lang="en-US" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>基本设置</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="郁郁苍苍,Share,分享,生活,快乐,让世间美好与你环环相扣">
    <meta name="time" content="写自于2020年一个雪虐风饕的晚上">
    <meta name="description" content="乐人之乐,人亦乐其乐;忧人之忧,人亦忧其忧。郁郁苍苍 一个可以分享心情,分享时光,分享生活点滴的社交平台">
    <link rel="icon" th:href="@{/favicon.ico}"  type="image/x-icon"/>
    <link rel="bookmark" th:href="@{/favicon.ico}"  type="image/x-icon"/>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/css/global.css}">
    <link rel="stylesheet" th:href="@{/layui/css/modules/layer/default/layer.css}">
</head>
<body>

<!--引入上边栏-->
<div th:replace="~{common/header::head}"></div>
<!--页面中间-->
<div class="layui-container fly-marginTop fly-user-main">
    <!--登录后的-用户左边栏-->
    <ul class="layui-nav layui-bg-cyan layui-nav-tree layui-inline" lay-filter="user">
        <li class="layui-nav-item">
            <a th:href="@{'/user/home/'+${session.loginUser.getUid()}}">
                <i class="layui-icon">&#xe609;</i>
                我的主页
            </a>
        </li>
        <li class="layui-nav-item layui-this">
            <a th:href="@{'/user/set/'+${session.loginUser.getUid()}}">
                <i class="layui-icon">&#xe620;</i>
                基本设置
            </a>
        </li>
        <li class="layui-nav-item ">
            <a th:href="@{/user/index}">
                <i class="layui-icon">&#xe60a;</i>
                我的帖子
            </a>
        </li>
        <li class="layui-nav-item">
            <a th:href="@{/user/message}">
                <i class="layui-icon">&#xe611;</i>
                我的消息
            </a>
        </li>

        <li class="layui-nav-item">
            <a th:href="@{/user/relation}">
                <i class="layui-icon">&#xe770;</i>
                我的圈子
            </a>
        </li>
    </ul>
    <!--手机适配-->
    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon"></i>
    </div>
    <div class="site-mobile-shade"></div>

    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief" lay-filter="user">
            <ul class="layui-tab-title" id="LAY_mine">
                <li class="layui-this" lay-id="info">我的资料</li>
                <li lay-id="avatar">头像</li>
                <li lay-id="pass">密码</li>
                <!--
                <li lay-id="bind">帐号绑定</li>
                -->
            </ul>
            <div class="layui-tab-content" style="padding: 20px 0;">

                <!--                修改基本信息-->
                <div class="layui-form layui-form-pane layui-tab-item layui-show">
                    <form class="layui-form">
                        <div class="layui-form-item">
                            <label for="L_nickname"  class="layui-form-label">昵称</label>
                            <div class="layui-input-inline">
                                <input type="text" id="L_nickname" name="nickname" th:value="${UserInfo.getNickName()}"
                                       required lay-verify="required|nickName" placeholder="必填哦"
                                       autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline" th:if="${UserInfo.getSex() == 1}">
                                    <input type="radio" name="sex" value="1" checked title="男">
                                    <input type="radio" name="sex" value="2" title="女">
                                </div>
                                <div class="layui-input-inline" th:if="${UserInfo.getSex() == 2}">
                                    <input type="radio" name="sex" value="1" title="男">
                                    <input type="radio" name="sex" value="2" checked title="女">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">生日</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="birthday" required lay-verify="required"
                                           th:value="${#dates.format(UserInfo.getBirthday(), 'yyyy-MM-dd')}"
                                           class="layui-input" id="test29" placeholder="年-月-日">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="L_Mobile" class="layui-form-label">手机号</label>
                            <div class="layui-input-inline">
                                <input type="text" id="L_Mobile" name="mobile" lay-verify="mobile"
                                       th:value="${UserInfo.getMobile()}" placeholder="可选填哦"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="L_location" class="layui-form-label">城市名</label>
                            <div class="layui-input-inline">
                                <input type="text" id="L_location" name="location" th:value="${UserInfo.getLocation()}"
                                       lay-verify="required|location"  autocomplete="off" placeholder="必须填哦" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label for="L_signature" class="layui-form-label">个性签名</label>
                            <div class="layui-input-block">
                                    <textarea id="L_signature" name="signature" th:utext="${UserInfo.getSignature()}"
                                              th:value="${UserInfo.getSignature()}" autocomplete="off"
                                              placeholder="随便写些什么刷下存在感" lay-verify="signature"
                                              class="layui-textarea" style="height: 80px;"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <button class="layui-btn layui-btn-danger" alert="1" lay-filter="setInfo" lay-submit type="button">提交
                            </button>
                        </div>
                    </form>
                </div>
                <!--修改头像-->
                <div class="layui-form layui-form-pane layui-tab-item">
                    <div class="layui-form-item">
                        <div class="avatar-add">
                            <p>建议尺寸200*200，支持jpg、png、gif，最大不能超过2MB</p>
                            <button type="button" class="layui-btn layui-btn-danger upload-img" id="test1">
                                <i class="layui-icon">&#xe67c;</i>上传头像
                            </button>
                            <div class="layui-upload-list">
                                <img th:src="${session.loginUser.getAvatar()}" class="layui-upload-img" id="demo1">
                                <p id="demoText"></p>
                            <span class="loading"></span>
                            </div>
                        </div>

                    </div>
                </div>
                <!--                修改密码-->
                <div class="layui-form layui-form-pane layui-tab-item">
                    <form class="layui-form">
                        <div class="layui-form-item">
                            <label for="L_username" class="layui-form-label">邮箱</label>
                            <div class="layui-input-inline">
                                <input type="text" id="L_username" name="username" required
                                       lay-verify="required|email" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">目前仅允许通过邮箱修改密码</div>
                        </div>
                        <div class="layui-form-item">
                            <label for="email_code" class="layui-form-label">验证码</label>
                            <div class="layui-input-inline">
                                <input type="text" id="email_code" name="email_code" required
                                       lay-verify="required|email_code" placeholder="请输入邮箱验证码" autocomplete="off"
                                       class="layui-input"></div>
                            <div class="layui-form-mid" style="padding: 0!important;">
                                <input class="layui-btn layui-btn-normal"
                                       name="btnSendCode" type="button"
                                       onclick="sendMessage()" id="btnSendCode" value="获取验证码"/>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="L_pass" class="layui-form-label">新密码</label>
                            <div class="layui-input-inline">
                                <input type="password" id="L_pass" name="pass" required lay-verify="required|pass"
                                       autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">8到18个字符</div>
                        </div>
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">确认新密码</label>
                            <div class="layui-input-inline">
                                <input type="password" id="L_repass" name="repass" required
                                       lay-verify="required|repass" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <button class="layui-btn layui-btn-danger" alert="1" lay-filter="updatePassword" lay-submit type="button">
                                确定修改
                            </button>
                        </div>
                    </form>
                </div>
                <!-- 账号绑定-->
                <!--
                 <div class="layui-form layui-form-pane layui-tab-item">
                     <ul class="app-bind">
                         <li class="fly-msg app-havebind">
                             <i class="iconfont icon-qq"></i>
                             <span>已成功绑定，您可以使用QQ帐号直接登录Share社区，当然，您也可以</span>
                             <a href="javascript:;" class="acc-unbind" type="qq_id">解除绑定</a>
                             &lt;!&ndash; <a href="" onclick="layer.msg('正在绑定微博QQ', {icon:16, shade: 0.1, time:0})" class="acc-bind" type="qq_id">立即绑定</a>
                             <span>，即可使用QQ帐号登录Share社区</span> &ndash;&gt;
                         </li>
                         <li class="fly-msg">
                             <i class="iconfont icon-weibo"></i>
                             &lt;!&ndash; <span>已成功绑定，您可以使用微博直接登录Share社区，当然，您也可以</span>
                             <a href="javascript:;" class="acc-unbind" type="weibo_id">解除绑定</a> &ndash;&gt;
                             <a href="" class="acc-weibo" type="weibo_id"
                                onclick="layer.msg('正在绑定微博', {icon:16, shade: 0.1, time:0})">立即绑定</a>
                             <span>，即可使用微博帐号登录Share社区</span>
                         </li>
                     </ul>
                 </div>
                 -->
            </div>
        </div>
    </div>
</div>
<!--页面底部-->
<div th:replace="~{common/footer::foot}"></div>
<script th:src="@{/js/mods/set.js}"></script>
</body>
</html>